Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support multiple transformers and excluding transformers from Eloquent casting #588

Closed

Conversation

innocenzi
Copy link
Contributor

@innocenzi innocenzi commented Oct 12, 2023

This pull request is an attempt at solving the use case described in #579.

It implements two major changes:

  • Base classes and properties now support multiple transformers
  • Transformers implementing ExcludeFromEloquentCasts are ignored during Eloquent casting

Additionally:

  • WithTransformer can now be applied multiple times.
  • setTransformers has been added to DataConfig for convenience

Note: technically, this pull request contains a breaking change (DataProperty::$transformer is now DataProperty::$transformers).

Marking as draft because I'm not convinced about this approach.

@innocenzi innocenzi marked this pull request as draft October 12, 2023 18:35
@innocenzi innocenzi closed this Oct 12, 2023
@innocenzi
Copy link
Contributor Author

Replaced by #589

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant